package com.xjiye_test.payServer.servletGroup.fkd;


import com.xjiye_test.payServer.serverletUtil.ReadBytes;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;

/**
 * Created by Administrator on 2017/6/28.
 */
public class notify extends HttpServlet {
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("UTF-8");
        PrintWriter out = resp.getWriter();
        req.getParameter("");
        String reStr=null;
        req.setCharacterEncoding("UTF-8");
        int size = req.getContentLength();
        InputStream is = req.getInputStream();
        reStr=new String(ReadBytes.readBytes(is, size));
        System.out.println(reStr);
        out.print("success");
        out.flush();
    }

    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doPost(req,resp);
    }
}
